﻿@model List<CSharpDay06__MVC_with_User_Input_.Models.Shape>

<!--Despite the fact that we assign IDs evertime we create a new object for the list, we still go through the list and
    we read the id and use the id to create dynamic actions of read and delete (or update)
     see HREF for both details and delete-->
@foreach (var shape in Model)
{
    <div class="well container">
        <h3><i>Name: </i>@shape.GetType().Name</h3>
        <h3><i>Area: </i>@shape.GetArea()</h3>
        <a class="btn btn-info" href="/Home/About/@shape.Id">Details</a>

        <!--See Delete reference on HomeController. Notice the ATshapedotID this 
            passes the respective Id of object to the functions (IN this case delete) on the Controller Page-->
        <a class="btn btn-danger" href="/Home/Delete/@shape.Id">Delete!</a>
        <!--The exact same thing as above-->
        @*@Html.ActionLink("Details", "About", new { Id = shape.Id }, new { @class = "btn btn-info" })*@
    </div>
    <br />
}